package com.lyx.service.impl;

import com.lyx.entity.Employee;
import com.lyx.mapper.EmpMapper;
import com.lyx.service.EmpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * --- Be Humble and Hungry ---
 *
 * @author McMeloxD
 * @date 2024/8/1
 * @desc
 */
@Service
public class EmpServiceImpl implements EmpService {

    @Autowired
    private EmpMapper empMapper;

    @Override
    public List<Employee> findAllInfos() {
        return empMapper.findAllInfos();
    }

    @Override
    public List<Employee> findSpAllInfos() {
        return empMapper.findSpAllInfos();
    }

    @Override
    public boolean addInfo(Employee emp) {
        return empMapper.addInfo(emp);
    }

    @Override
    public boolean delInfo(String name) {
        return empMapper.delInfo(name);
    }

    @Override
    public boolean updateInfo(Employee infos) {
        return empMapper.updateInfo(infos);
    }
}
